package com.ruoyi.biz.attchment.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 附件对象 biz_attachment
 *
 * @author Fei.Cong
 * @date 2023-03-28
 */
@TableName(value = "biz_attachment")
public class BizAttachment extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 申请id
     */
    @Excel(name = "申请id")
    private Long applyId;

    /**
     * 文件名称
     */
    @Excel(name = "文件名称")
    private String fileName;

    /**
     * 原文件名称
     */
    @Excel(name = "原文件名称")
    private String originFileName;

    /**
     * 文件扩展名
     */
    @Excel(name = "文件扩展名")
    private String fileExt;

    /**
     * 文件地址
     */
    @Excel(name = "文件地址")
    @NotBlank(message = "请上传附件文件")
    private String filePath;

    /**
     * 附件类型
     */
    @Excel(name = "附件类型")
    private Integer attachmentType;

    /**
     * 是否有效
     */
    @Excel(name = "是否有效")
    private Integer valid;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setApplyId(Long applyId) {
        this.applyId = applyId;
    }

    public Long getApplyId() {
        return applyId;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setOriginFileName(String originFileName) {
        this.originFileName = originFileName;
    }

    public String getOriginFileName() {
        return originFileName;
    }

    public void setFileExt(String fileExt) {
        this.fileExt = fileExt;
    }

    public String getFileExt() {
        return fileExt;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getFilePath() {
        return filePath;
    }

    public Integer getAttachmentType() {
        return attachmentType;
    }

    public void setAttachmentType(Integer attachmentType) {
        this.attachmentType = attachmentType;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public Integer getValid() {
        return valid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("applyId", getApplyId())
                .append("fileName", getFileName())
                .append("originFileName", getOriginFileName())
                .append("fileExt", getFileExt())
                .append("filePath", getFilePath())
                .append("attachmentType", getAttachmentType())
                .append("remark", getRemark())
                .append("valid", getValid())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
